﻿using System.Diagnostics;
using System.Reflection;

namespace _62_C__WPF设置并读取程序集版本号和文件版本号
{
    internal class Program
    {
        static void Main(string[] args)
        {

            Assembly assembly = Assembly.GetExecutingAssembly();
            Version version=assembly.GetName().Version;
            Console.Title = $"我的程序 v{version}";

            FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
            string fileVersion = fileVersionInfo.FileVersion;
            Console.WriteLine(fileVersion);


            Console.ReadKey();
        }
    }
}
